Method and apparatus for managing power in computer systems

ABSTRACT

The invention is directed towards minimizing power consumption in computer systems. One embodiment of the invention is a power management system that is used for a computer system that has at least one device and one power domain. This embodiment uses two different power managers to manage the power consumption of the device and the power domain. Specifically, this embodiment has (1) a first power manager that determines when to change power state of the device, and (2) a second power manager that determines when to change power state of the power domain. Each of these power managers decides to change the power state of its corresponding device or domain based on information from several different sources. These sources can include power-management clients and power managers of related domains or devices.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of U.S. patent application Ser. No. 14/167,720,filed on Jan. 29, 2014 entitled “METHOD AND APPARATUS FOR MANAGING POWERIN COMPUTER SYSTEMS,” which is a continuation of U.S. patent applicationSer. No. 13/488,440 filed Jun. 4, 2012 entitled “METHOD AND APPARATUSFOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No. 8,650,417issued on Feb. 11, 2014, which is a continuation of U.S. patentapplication Ser. No. 13/047,771, filed Mar. 14, 2011, entitled “METHODAND APPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No.8,214,669 issued Jul. 3, 2012, which is a continuation of U.S. patentapplication Ser. No. 12/400,777 filed Mar. 9, 2009 entitled “METHOD ANDAPPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No.7,925,905 issued Apr. 12, 2011, which is a continuation of U.S. patentapplication Ser. No. 10/934,075 filed Sep. 3, 2004, entitled “METHOD ANDAPPARATUS FOR MANAGING POWER IN COMPUTER SYSTEMS,” now U.S. Pat. No.7,519,838 issued Apr. 14, 2009, which is a continuation of U.S. patentapplication Ser. No. 09/696,908 filed Oct. 26, 2000 entitled “AHIERARCHICAL POWER MANAGEMENT SYSTEM FOR CONTROLLING THE POWER STATES OFINDIVIDUAL DEVICES AND DOMAINS,” now U.S. Pat. No. 6,802,014 issued Oct.5, 2004, each of which are incorporated herein by reference in theirentirety.

FIELD

Numerous power management schemes have been proposed for managing thepower consumption of computer systems. Such schemes typically power downidle devices in order to save power and reduce heat. Power conservationis especially important in portable computers that need to maximizetheir battery life.

BACKGROUND

FIG. 1 illustrates a conventional power management scheme. This powermanagement scheme 100 utilizes a single centralized power manager tocontrol the power consumption of its computer system. This powermanagement scheme includes a power manager 105, several power managementclients 110, and several device drivers 115. As shown in FIG. 1, thedevice drivers control several devices 120 of the computer system.

The power manager 105 is a centralized piece of software that controlsthe power consumption of the devices 120. Specifically, this managercommunicates with device drivers 115 and with certain devices 120, inorder to receive information about the operational states of the devices120. Based on these operational states and on the power manager'sknowledge of the hardware devices, the power manager determines when tochange each device's power state.

The power management clients 110 can also order the power manager tochange the device power states. For instance, the power managementclients might order the power manager to put the system to sleep basedon a user's manual request or the computer's automated sleep setting. Inportable computers, the power management clients 110 might also requestthe power manager to put the system to sleep when the battery level iscritically low. As shown in FIG. 1, the power manager 105 directlyorders certain devices (e.g., device 4 in this figure) to change theirpower states, while ordering other devices through the device drivers115.

The centralized power management scheme of FIG. 1 has severaldisadvantages. For instance, it requires one centralized power managermodule to know how to communicate with the device drivers and in someinstances with the devices themselves. This, in turn, complicates thedevelopment and maintenance of the power manager module. The powermanager needs to be modified each time a device driver is modified or anew one is added. Moreover, the power manager needs to have detailedinformation about the operation of the devices. This manager also needsto know the hierarchical relationship between the devices. Theserequirements, in turn, complicate the structure and operation of thepower manager.

Therefore, there is a need in the art for a distributed power managementmethod. Ideally, this method should simplify the structure and operationof the power management system, and impose minimal development andmaintenance requirements.

SUMMARY

The invention is directed towards minimizing power consumption incomputer systems. One embodiment of the invention is a power managementsystem that is used for a computer system that has at least one deviceand one power domain. This embodiment uses two different power managersto manage the power consumption of the device and the power domain.Specifically, this embodiment has (1) a first power manager thatdetermines when to change power state of the device, and (2) a secondpower manager that determines when to change power state of the powerdomain. Each of these power managers decides to change the power stateof its corresponding device or domain based on information from severaldifferent sources. These sources can include power-management clientsand power managers of related domains or devices.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features of the invention are set forth in the appendedclaims. However, for purpose of explanation, several embodiments of theinvention are set forth in the following figures.

FIG. 1 illustrates a convention power management scheme.

FIG. 2 illustrates an example of a hierarchical power domain of acomputer system.

FIG. 3 illustrates one manner of controlling the power of a particulardevice in some embodiments of the invention that utilize a distributedpower management scheme.

FIG. 4 illustrates one manner for controlling the power usage of a powerdomain in some embodiments of the invention that utilize a distributedpower management scheme.

FIG. 5 illustrates a power-manager object hierarchy that corresponds tothe hierarchical power domain of FIG. 2.

FIG. 6 illustrates the data structure of a connecting object used in thepower-manager hierarchy of FIG. 5.

FIG. 7 illustrates the data structure for a power manager object.

FIG. 8 illustrates a process for reducing the power state of a devicedue to its inactivity.

FIG. 9 presents a process performed by a power manager of a power domainwhen it is notified by one of its member domains or devices that it hasreduced its input power requirements.

FIG. 10 presents a process performed by a root power manager to carryout a power-down-on-request procedure.

FIG. 11 presents a process that the non-root power managers perform tocarry out a power-down-on-request procedure.

FIG. 12 presents a process that a device's power manager performs topower up a device.

FIG. 13 illustrates a process a non-device power manager performs whenone of its child power managers notifies it of its higher input powerrequirements.

FIG. 14 illustrates a process that the root power manager performs whenthe computer system turns on.

FIG. 15 illustrates a process a non-root power manager performs when itreceives notification from its parent that the parent has raised itsoutput power characteristic.

FIG. 16 presents one example of a computer that can be used inconjunction with the invention.

DETAILED DESCRIPTION

In the following description, numerous details are set forth for purposeof explanation. However, one of ordinary skill in the art will realizethat the invention may be practiced without the use of these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order not to obscure the description of theinvention with unnecessary detail.

The invention is directed towards minimizing power consumption incomputer systems. This minimization, in turn, saves power, reduces heat,and maximizes battery life in portable computers. The inventionminimizes power consumption by altering the power usage of “devices” and“power domains,” in a manner that does not interfere with the use of thecomputer systems.

A “device” is a hardware entity in the computer system. Disk drives anddisplays are examples of devices. A device typically has two or morepower states. When a device's power is dependent on the system power,the device typically maintains some kind of state that needs to be savedand restored across changes in system power.

Two power states that devices often have are (1) the “on” state, wherethe device uses maximum power and has complete functionality, and (2)the “off” state, where the device uses no power and has no capability.Some devices also have other intermediate power states. In a reducedpower state, a device (1) might be usable but at some lower level ofperformance or function, or (2) might not be usable but still retainsome configuration or state.

An internal disk drive is an example of a device with more than the twosimple power states. In its highest state, it is completely on. The diskdrive can also be placed in the next lower state by turning off thedrive motor. There is no state or configuration that needs to be savedduring this transition. The drive electronics can also be turned off byturning off the entire domain, which supplies the drive. This transitiondoes require state and configuration saving.

A “power domain” is a switchable source of power in the computer system.Such a domain typically provides power for some number of devices ordomains, which are members of the power domain. When a power domain isoff, all of its members are also off Like devices, each power domaintypically has at least two power states, on and off, and it may haveadditional intermediate states in which its members have some reducedcapability.

Power domains are often hierarchical. In other words, one power domainmay contain other child power domains, each of these child power domainsmay contain other child domains, and so on. In some embodiments of theinvention, the hierarchical power schemes have one power domain, calledthe root power domain that represents the main power of the computersystem. In other embodiments, however, the hierarchical power schemeshave multiple root power domains that define multiple sources of powerin a computer system. Such multiple root power domains can definemultiple dependent or independent hierarchical power relationships.

FIG. 2 illustrates an example of a computer system's hierarchical powerdomain 200 that includes only one root power node 205. As shown in thisfigure, each power domain can have one or more child domains or devices.The PC card system is an example of a power domain within another powerdomain. It provides power to its member devices, the PC card slots, andit is itself a member of a larger power domain, the root power domain.In addition, as illustrated by child domain 210 and device 215, eachchild domain or device can be part of one or more parent domains.Moreover, each hierarchical branch can be arbitrarily deep as shown inFIG. 2.

Some embodiments of the invention are distributed and hierarchical powermanagement architectures for controlling the power consumption ofcomputer systems. FIGS. 3-5 illustrate one example of such architecture.FIG. 3 illustrates how this architecture controls the power usage of aparticular device. As shown in this figure, this scheme includes apower-controlling driver 310 and a power manager 315 for each device305. The power-controlling driver knows about the various power statesof the device and can direct the device to switch between them. In somecases, this driver also monitors the usage of the device.

In some cases, the power manager 315 also monitors the usage of thedevice. In addition, the power manager 315 is responsible for directingthe power-controlling driver 310 to instruct the device 305 to switchpower states. The power manager determines when to change the device'spower state. The power manager makes this determination based oninformation that it receives from the driver, from its device's powerdomain, or from some component (e.g., a power management client) of thecomputer system.

For instance, when the device 305 becomes idle, the power managerrecognizes the operational status of the device throughthe-power-controlling driver 310 (e.g., the driver notifies the powermanager of the idle status of the device). After analyzing thisoperational status, the power manager might decide that the device cantolerate a lower power state, and thereby it might instruct thepower-controlling driver to lower the device's power state.

A power manager might also decide to change its device's power statewhen the power manager receives information (such as information aboutthe user's keyboard or mouse activity) from a power management client.In addition, the power manager might also instruct the power-controllingdriver 310 to change its device's power state, when it receives newoutput power characteristics for the device's power domain.

In some embodiments, a device's power manager receives the output powercharacteristics for the device's power domain or domains from powermanagers of the power domain or domains. A power domain's power manageris presented in FIG. 4.

FIG. 4 illustrates one manner for controlling the power usage of a powerdomain 405. As shown in this figure, the power domain 405 can becontrolled very much like the device 305. Specifically, a power manager415 and a power-controlling driver 410 can be used to control the powerto the power domain 405. The power-controlling driver 410 knows aboutthe various power states of the power domain 405 and can direct thedomain to switch between them. The power manager 415, on the other hand,is responsible for (1) determining when to change the power domain'spower state, and (2) instructing the power-controlling driver 410 todirect the power domain 405 to switch power states when it needs to doso.

One difference between the power management of the power domain 405 andthe device 305 is that the power-controlling driver 410 and power manger415 alter the character of the power that supplies the members of thepower domain, instead of altering the power consumption of a device.Another difference is that, in some embodiments of the invention, thepower manager 415 and power-controlling driver 410 of a power domain donot have any idle judgment (i.e., they do not decide whether their powerdomain is idle or not). In these embodiments, (1) the power domain'smanager 415 only decides to raise and lower power in its domain based onrequests from its members (i.e., the power manager's of its powerdomain's children), and if applicable, its parent power domain, and (2)the power-controlling driver 410 directs its domain to switch powerstates. Typically, the power manager 415 maintains the power domain inthe lowest state that all of its children (I.e., its member devicesand/or power domains) can tolerate.

In some embodiments, the power managers 315 and 415 and thepower-controlling drivers 310 and 410 are data objects subclassed from acommon class. In some of these embodiments, the methods associated withthese objects perform power management procedures that allow the objectsto communicate with each other in order to control the computer system'spower usage.

Moreover, in some embodiments, the power managers are linked to form ahierarchy that mimics the computer system's power hierarchy.Specifically, in these embodiments, the power managers of the powerdomains link to the power managers of their parent and child domains anddevices in the power hierarchy. Similarly, the power managers of thedevices link to the power managers of their parent power domains.Consequently, in these embodiments, the power managers form a hierarchythat resembles the system's power hierarchy.

FIG. 5 illustrates a power-manager hierarchy 500 that corresponds to thehierarchical power domain of FIG. 2. In this power-manager hierarchy,each power manager is a data object. This hierarchy has three types ofpower manager objects, which are: the root power-domain power managerobject 415R, the power-domain power manager objects 415NR, and thedevice power manager objects 315.

In this object hierarchy, the device power manager objects 315 arelinked to the devices 305 (in the hierarchical power domain 200 of FIG.2) through their corresponding power-controlling drivers 310. Similarly,each power-domain power manager object 415R or 415NR is linked to itscorresponding power domain 405 (in the hierarchical power domain 200 ofFIG. 2) through it corresponding power-controlling drivers 410.

As shown in FIG. 5, each power-manager object 315 or 415 can interfacewith one or more power-management clients 510. The methods associatedwith these objects allow them to field calls from their respective powermanagement clients. These calls can then direct these object to informtheir child objects, their domains, and/or their devices to turn on oroff, or to go to sleep.

The power-management clients for the root node typically are concernedwith the power usage of the entire computer system. In other words, thecalls from these clients often direct the root object to inform itschild power-manager objects to turn the system on or off, or to put thesystem to sleep. The power-management clients for the non-root nodes, onthe other hand, are typically concerned only about the power consumptionof their respective domains or devices.

As further shown in FIG. 5, some embodiments of the invention utilizeconnecting objects 515 to link each parent and child power-managerobjects in the power-manager hierarchy 500. FIG. 6 illustrates aconnecting object's data structure 600 for some embodiments of theinvention. As shown in FIG. 6, this data structure includes pointers 605and 610 to the parent and child objects of the particular connectingobject.

This structure data 600 also includes fields 615 and 620 thatrespectively store the child's current input power requirements, and theparent's current output power characteristics. As further describedbelow, the parent power-manager object stores the child's input powerrequirements in the connecting object, while the child's power-managerobject stores the parent's current output power characteristics in theconnecting object.

FIG. 7 illustrates a power-manager object's data structure 700 that isused in some embodiments of the invention. As shown in this figure, thisdata structure includes (1) a data field 705 for storing the currentpower state of the manager's corresponding device or domain, (2) a datafield 710 for storing the desired power state of the manager'scorresponding device or domain, (3) a data field 715 for storing theaggregate output power characteristics of the manager's parent powerdomain or domains, and (4) a data field 720 for storing the aggregateinput power requirements of the manager's child domains and/or devices.A power manager object for a device also includes an activity field (notshown) that the power manager can use to ascertain whether the devicehas been idle.

As shown in FIG. 7, the power-manager data structure 700 also includes apointer 725 to a power array 750. This data structure also includes afield 730 indicating the size of the power array 750. The power arrayhas one entry 765 per power state of the corresponding domain or device(i.e., the size of the array equals the number of power states of thecorresponding domain or device). Each entry 765 in the array stores theinput power requirement and output power characteristic of the powermanager's domain or device in that state. Each state's input powerrequirement specifies the power that the manager's domain or deviceneeds from its parent in order to operate in that state. Also, eachstate's output power characteristic specifies the output power that themanager's domain can provide in that state.

In some embodiments, the input power requirements specify the type ofpower-draining signals that a device or domain needs in order to operatein a particular state, while the output power characteristics specifythe type of power-draining signals that a domain can provide in aparticular state. Power-draining signals are any type of signals thatdrain the computer system's power. Clock signals and operational powersignals (e.g., voltage signals) are examples of such power-drainingsignals.

FIG. 7 illustrates that the power-manager data structure 700 furtherincludes a pointer 745 to the power-controlling driver 310 or 410, whichcan control the power state of its device or domain. This data structurealso includes (1) a pointer 735 to a list 755 that identifies (i.e.,refers to) the power manager's parent connecting objects, and (2) apointer 740 to a list 760 that identifies the power manager's childconnecting objects. The parent and child connecting objects 515, inturn, connect the power manager object to the power manager objects ofone or more parent or child domains or devices.

Some embodiments of the invention power down the computer system in oneof two ways. First, they power down the system when the devices havebeen inactive for a particular duration of time. Second, they power downthe system when a power management client orders the root power managerto do so.

FIGS. 8 and 9 illustrate the processes for powering down devices andpower up processes since the power reduction propagates from the devicesup to the root power node.

FIG. 8 illustrates a process 800 that a power manager 315 performs topower down its device when the device has been inactive. This processrepeatedly starts at predetermined time intervals that are defined bythe expiration of a timer. This timer is initially set when the computersystem is initially turned on, and is thereafter set at the end ofprocess 800, as further described below.

Once the process 800 starts, it initially determines (at 805) whetherthe activity flag of the power manager object has been set. This flag isreset at boot-up and at the end of process 800. The power-controllingdriver sets this flag if the device is active (i.e., has at least oneactivity) during the time interval measured by the timer. Hence, theprocess 800 uses the timer and the activity flag to determine whetherthe device has been idle for duration of time. One of ordinary skillwill understand that alternative techniques can also be used todetermine the idleness of devices. For instance, instead of usingactivity flags, some embodiments use predicative methods, while othersreset the activity timer after each activity. Also, in some embodiments,the power-management client instructs the device's power manager thatthe device is no longer needed.

If the process 800 determines (at 805) that there was activity duringthe predetermined time interval, the process transitions to 830, whereit resets the timer and the activity flag. On the other hand, if theprocess determines (at 805) that there was no activity (i.e., that theactivity flag was not set), the process determines (at 810) whether thedevice is in its lowest power state. The process makes thisdetermination by comparing the current power state value of field 705 tothe lowest power state value of the device. Some embodiments define thelowest power state to be state 0. Hence, in these embodiments, theprocess determines (at 810) whether the current power state variableequals 0.

If the device is in its lowest power state, the process transitions to830 to reset the timer and the activity flag. Otherwise, the processasks (at 815) the power-controlling driver to reduce the power of thedevice to the next lowest state. Next, the process decrements (at 820)the current power state variable by 1.

The process then sends (at 825) its device's input power requirements inits current, decremented state to its parent power manager or managers.The process retrieves its device's input power requirement in itscurrent, decremented power state from the power array entry 765 thatcorresponds to the current, decremented power state. The process nexttransitions to 830 to reset the timer and the activity flag. The processthen ends.

FIG. 9 presents a process 900 performed by a power manager of a powerdomain. This process starts when the power manager receives from one ofits child power managers (i.e., a power manager of one of its memberdomains or devices) reduced input power requirements.

After receiving the new input power requirements, the process 900initially (at the process' power manager, and stores the resulting valuein the connecting object for the child. Next, the process (at 910) (1)retrieves all the input power requirements of its children from theircorresponding connecting objects, (2) adds the retrieved values, and (3)stores this sum in the aggregate field 720 of its power manager's datastructure.

The process then identifies (at 915) the power state corresponding tothe aggregate input power requirement that the process computed at 910.In other words, at 915, the process identifies the power array entry 765that has an output power characteristic equal to the aggregate inputpower requirement generated at 910. The position of the identified entryspecifies the power state for the process' power manager.

The process then determines (at 920) whether the power state identifiedat 915 is different from the current power state, which is stored infield 705 of data structure 700. If not, the process ends. Otherwise,the process instructs (at 925) its power-controlling driver 410 tochange its domain's power level to the power state identified at 915.

Next, the process (at 930) sets the current power state equal to the newpower state identified at 915, and stores the current power state infield 705 of the data structure 700. If the process' power manager isnot the root power manager, the process sends (at 935) its domain'sinput power requirements for the power state identified at 915, to itsparent power manager or managers. The process retrieves its domain's newinput power requirement from the power array entry 765 that correspondsto the current, decremented power state. After notifying its parentpower manager or managers, the process ends.

FIGS. 10 and 11 illustrate the power-down-on-request procedure used insome embodiments of the invention. As further described below, in such aprocedure, the power-down request propagates down that power managerobject hierarchy, and the power-down acknowledgments propagate up thishierarchy.

FIG. 10 presents a process 1000 that the root power manager 415Rperforms to carry out the power-down request procedure. This processstarts when the root power manager receives notification from one of thepower management clients to reduce the system's power state (e.g., toturn off the system or to put the system to sleep). The power managementclients might make such a request for a variety of reasons, such as theautomatic or manual generation of sleep command, the closing of thelaptop, or the detection of low battery level.

Once the process 1000 starts, it initially notifies (at 1005) each ofthe root's child power managers that the power will change. In itsnotification, the process provides the output power characteristics ofthe root power node in the upcoming reduced power state. The processthen transitions to 1010, where it remains until the root power managerreceives acknowledgments from each of its child power managers thattheir domains or devices can tolerate the upcoming reduced power state.In some embodiments, each child power manager provides its input powerrequirements in the reduced power state when it wants to acknowledgethat it can tolerate this power state. The root power manager thenanalyzes the received input power requirements to deduce that its childpower managers can tolerate the reduced power state.

Once the process 1000 receives acknowledgments from all its child powermanagers, it switches (at 1015) to that reduced power state, and thenends. To switch to the new power state, the process 1000 (1) instructsits corresponding power-controlling driver 410 to change the rootdomain's power level to the reduced power state, (2) changes its currentpower state value to the reduced power state, and (3) stores this valuein field 705 of its data structure 700.

FIG. 11 presents a process 1100 that the non-root power managers performto carry out a power-down-on-request procedure. Each non-root powermanager starts this process whenever it receives notification from aparent power manager that it will lower its output powercharacteristics.

Once the process 1100 starts, the non-root power process initially (at1105) masks out the portion of the parent's output power characteristicthat does not relate to the process' power manager, and stores theresulting value in the connecting object for the parent. Next, theprocess (at 1110) (1) retrieves all the output power characteristics ofits parents from their corresponding connecting objects, (2) adds theretrieved values, and (3) stores this sum in the aggregate field 715 ofits power manager's data structure.

The process then identifies (at 1115) the power state corresponding tothe aggregate output power characteristic computed at 1110. In otherwords, at 1115, the process identifies the power array entry 765 thathas an input power requirement equal to the aggregate output powercharacteristic generated at 1110. The position of the identified entryspecifies the power state for the process' power manager.

The process then determines (at 1120) whether the power state identifiedat 1115 is different from its current state, which is stored in its datastructure field 705. If not, the process ends. Otherwise, the processdetermines (at 1125) whether its power manager has any child powermanagers.

If not, the process transitions to 1140, which will be described below.On the other hand, if the process' power manager has child powermangers, the process notifies (at 1130) each of the child managers thatthe power will change. In its notification, the process provides its newoutput power characteristics in the upcoming reduced power state. Theprocess then transitions to 1135, where it remains until it receivesacknowledgments from each of the notified child power managers thattheir domain or device can tolerate the upcoming reduced power state. Insome embodiments, the child power managers acknowledge their tolerancefor the reduced power state by providing the process with their inputpower requirements for this state. The process 1100 can then examine itspower array 750 and determine that the new input power requirements ofits child managers correspond to the desired reduced power state.

Once the process 1100 determines that all its children have acknowledgedits message or that it does not have any children, the processtransitions to 1140 to switch to its reduced power state. To switch tothe new power state, the process 1100 (1) instructs its correspondingpower-controlling driver 310 or 410 to change its domain's or device'spower level to the reduced power state, (2) changes its current powerstate value to the reduced power state, and (3) stores this value infield 705 of its data structure 700.

The process then acknowledges (at 1145) to its parent power manager ormanagers that its device or domain is in the new reduced power state. Insome embodiments, the process 1100 provides this acknowledgment bynotifying its parent power manager or managers of its input powerrequirements in its new power state. After acknowledging its domain's ordevice's new power state, the process 1100 ends.

FIGS. 12-15 illustrate several processes for powering up the system. Ofthese figures, FIGS. 12, 13, and 15 illustrate the processes forpowering up a device that was previously in a sleep state. Specifically,FIG. 12 presents a process 1200 that a device's power manager 315performs to power up a device in the sleep state. This process 1200starts when the device's power manager receives notification that theservices of its device are needed by some client application.

After starting, the process 1200 initially determines (at 1205) the newpower state required to provide the requested service. Next, the processnotifies (at 1210) its parent power manager or managers of its new inputpower requirements in its new power state. As further described below,each parent power manager notes this new input power requirement in theconnecting object for the device and the parent.

The process then determines (at 1215) whether its parents' currentoutput power is sufficient to power the device in its new state. In someembodiments, the process 1200 retrieves its parents' current outputpower from field 715 of its power manger's data structure 700.

If the process determines that the parents' output power is sufficient,the process switches (at 1220) to the new power state, and then ends. Toswitch to the new power state, the process 1200 (1) instructs itscorresponding power-controlling driver 310 to change the its device'spower level to the reduced power state, (2) changes its current powerstate value to the reduced power state, and (3) stores this value infield 705 of its data structure 700.

On the other hand, if the process determines (at 1215) that the parents'output power is not sufficient, the process sets (at 1225) the desiredpower state of field 710 to the state identified at 1205, and then endswithout switching to the new power state. In this situation, thedevice's power manager switches to the new power state after it receivesnotification from its parent power manager or managers that the parentpower manager or managers have increased their output powercharacteristics, as further described below by reference to FIG. 15.

FIG. 13 illustrates a process 1300 that a non-device power managerperforms when one of its child power managers notifies it of its higherinput power requirements. The process 1300 starts after receiving suchnotice. The process 1300 initially (at 1305) masks out the portion ofthe child's input power requirements that does not relate to theprocess' power manager, and stores the resulting value in the connectingobject for the child. Next, the process (at 1310) (1) retrieves all theinput power requirements of its children from their correspondingconnecting objects, (2) adds the retrieved values, and (3) stores thissum in the aggregate field 720 of its power manager's data structure.

The process then identifies (at 1315) the power state corresponding tothe aggregate input power requirement that the process computed at 1310.In other words, at 1315, the process identifies the power array entry765 that has an output power characteristic equal to the aggregate inputpower requirement generated at 1310. The position of the identifiedentry specifies the power state for the process' power manager.

The process then determines (at 1320) whether the power state identifiedat 1315 is greater than the current power state, which is stored infield 705 of data structure 700. If not, the process ends. Otherwise,for non-root power managers, the process 1300 then notifies (at 1325)its parent power manager or managers of its input power requirement inthe desired power state identified at 1315. This input power requirementis necessary to satisfy the requesting child's new input powerrequirement. The non-root power manager retrieves its desired inputpower requirement for the identified power state from its power array atthe entry 765 corresponding to the desired higher power state. The rootpower manager does not perform 1325 since it does not have a parent tonotify.

The process 1300 then determines (at 1330) whether its parents' outputpower is sufficient to power its domain in the new power state. In someembodiments, the process 1300 retrieves its parents' current outputpower from field 715 of its power manger's data structure 700.

If the process determines that the parents' output power is sufficient,the process switches (at 1340) to the new power state. To switch to thenew power state, the process 1300 (1) instructs its correspondingpower-controlling driver 410 to change the its domain's power level tothe higher power state, (2) changes its current power state value to thehigher power state, and (3) stores this value in field 705 of its datastructure 700. The process then notifies (at 1345) each of its childpower managers that it has changed power states, and gives them itscurrent output power characteristic in its new power state. After 1345,the process then ends.

On the other hand, if the process determines (at 1330) that the parents'output power is not sufficient, the process sets (at 1335) the desiredpower state of field 710 to the state identified at 1315, and then endswithout switching to the new power state. In this situation, thenon-root power manager switches to the new power state after it receivesnotification from its parent power manager or managers that the parentmanager or managers have increased their output power characteristics,as further described below by reference to FIG. 15.

FIG. 14 illustrates a process 1400 that the root power manager performswhen the computer system turns on. As shown in FIG. 14, this processsimply notifies (at 1405) each of the root power manager's childmanagers that the root power manager has changed states. With thisnotice, the root power manager also provides its output powercharacteristic in its new power state. In some embodiments, the rootpower domain has only two states, an off state and on state. In otherembodiments, the root power domain also has a sleep state.

FIG. 15 illustrates a process 1500 that a non-root power managerperforms when it receives notification from a parent power manager thatthe parent power manager has raised its output power characteristic. Theprocess 1500 initially (at 1505) masks out the portion of the parent'soutput power characteristic that does not relate to the process' powermanager, and stores the resulting value in the connecting object for theparent. Next, the process (at 1510) (1) retrieves all the output powercharacteristics of its parents from their corresponding connectingobjects, (2) adds the retrieved values, and (3) stores this sum in theaggregate field 715 of its power manager's data structure.

The process then identifies (at 1515) the power state corresponding tothe aggregate output power characteristic computed at 1510. In otherwords, at 1515, the process identifies the power array entry 765 thathas an input power requirement equal to the aggregate output powercharacteristic generated at 1510. The position of the identified entryspecifies the power state for the process' power manager.

The process then determines (at 1520) whether the power state identifiedat 1515 is greater than the desired state stored in field 710 of thepower manager data structure. If so, the process prepares (at 1525) toswitch to the desired power state. Otherwise, the process prepares (at1530) to switch to the identified power state.

From 1525 and 1530, the process transitions to 1535 to notify each ofits power manager's children that the power manager has changed states.With this notice, the process provides the output power characteristicof its power manager in the switched state. The process then ends.

FIG. 16 presents one example of a computer 1600. This computer 1600 apermanent storage device 1625, input devices 1630, and output devices1635. The bus 1605 collectively represents all system, peripheral, andchipset buses that communicatively connect the numerous internal devicesof the computer 1600. For instance, the bus 1605 communicativelyconnects the processor 1610 with the read-only memory 1620, the systemmemory 1615, and the permanent storage device 1625.

From these various memory units, the processor 1610 retrievesinstructions to execute and data to process in order to execute theprocesses of the invention. The read-only-memory (ROM) 1620 storesstatic data and instructions that are needed by the processor 1610 andother modules of the computer. The permanent storage device 1625, on theother hand, is read-and-write memory device. This device is anon-volatile memory unit that stores instruction and data even when thecomputer 1600 is off. Some embodiments of the invention use amass-storage device (such as a magnetic or optical disk and itscorresponding disk drive) as the permanent storage device 1625. Otherembodiments use a removable storage device (such as a floppy disk orZip® disk, and its corresponding disk drive) as the permanent storagedevice.

Like the permanent storage device 1625, the system memory 1615 is aread-and-write memory device. However, unlike storage device 1625, thesystem memory is a volatile read-and-write memory, such as a randomaccess memory. The system memory stores some of the instructions anddata that the processor 1610 needs at runtime. In some embodiments, theinvention's processes are stored in the system memory, the permanentstorage device 1625, and/or the read-only memory 1620.

The bus 1605 also connects to the input and output devices 1630 and1635. The input devices enable the user to communicate information andselect commands to the computer. The input devices 1630 include analphanumeric keyboard and a cursor-controller (such as a mouse or atouch-pad). The output devices 1635 display images generated by thecomputer. The output devices include printers and display devices, suchas cathode ray tubes (CRT) or liquid crystal displays (LCD).

Finally, as shown in FIG. 16, bus 1605 also couples to a network adapter1640. The network adapter connects the computer 1600 to a network ofcomputers (such as a local area network (“LAN”), a wide area network(“WAN”), or an Intranet) or a network of networks (such as theInternet). One of ordinary skill in the art will appreciate that theinvention can be used to manage the power of computers that havedifferent configurations and/or components than those of the computer1600 of FIG. 16.

The invention provides distributed power management architecture for acomputer system. This architecture has a simple structure and operation,and imposes minimal development and maintenance requirements.

For instance, each power manager only needs to know about its respectivedevice or domain, in the embodiments (1) that provide a power managerfor each device and power domain, and (2) that interrelate these powermanagers through a hierarchical relationship which mimics thehierarchical power distribution architecture. Hence, when a devicedriver is modified or a new driver or device is added, only the smalland discrete power manager for that device needs to be modified oradded. In addition, other than having to respond to their parents andchildren, the power managers of these embodiments do not need to havedetailed information about the hierarchical relationships of the domainsand devices.

One of ordinary skill will also recognize that the invention can beembodied in other specific forms without departing from the spirit ofthe invention, even though the invention has been described withreference to numerous specific details. In view of the foregoing, one ofordinary skill in the art will understand that the invention is not tobe limited by the foregoing illustrative details, but rather is to bedefined by the appended claims.

What is claimed is:
 1. A system, comprising: a first member device; asecond member device; and a root device, comprising: a processor; and amemory configured to store instructions that when executed by theprocessor cause the root device to perform steps that include: receivingan idle status signal from the first member device; automaticallysending a sleep command to the second member device in response toreceiving the idle status signal, wherein the sleep command causes thesecond member device to enter a first power state; receiving an activestatus signal from the first member device; and automatically sending awake command to the second member device in response to receiving theactive status signal, wherein the wake command causes the second memberdevice to transition into a second power state.
 2. The system as inclaim 1, wherein the steps further include: storing a schedulecorresponding to multiple power states of the second member device,wherein the second power state is selected from the multiple powerstates based on the schedule.
 3. The system as in claim 2, wherein apower domain corresponding to both the first member device and thesecond member device is controlled based on the schedule.
 4. The systemas in claim 3, wherein the steps further include: receiving an inputcorresponding to power usage of the power domain, wherein powerconsumption of the second member device in the second power state isbased on the input.
 5. The system as in claim 1, wherein a power domainproviding power to both the first member device and the second memberdevice is controlled by the root device.
 6. The system as in claim 1,wherein the second member device is configured to provide a feedbacksignal to the root device, and the root device includes a networkadapter configured to connect to the internet.
 7. A method for managingpower consumption of one or more member devices connected to a computingdevice, the method comprising: at a power manager of the computingdevice: receiving an idle status signal from a first member device;automatically sending a sleep command to a second member device, whichshares a common power domain with the first member device, in responseto receiving the idle status signal, wherein the sleep command causesthe second member device to enter a first power state; receiving anactive status signal from the first member device; and automaticallysending a wake command to the second member device in response toreceiving the active status signal, wherein the wake command causes thesecond member device to transition into a second power state.
 8. Themethod as in claim 7, further comprising: storing an amount of time thefirst member device is idle.
 9. The method as in claim 7, furthercomprising: resetting an activity timer in response to receiving theactive status signal from the first member device.
 10. The method as inclaim 7, wherein the first power state is a reduced power state relativeto the second power state.
 11. The method as in claim 7, wherein thefirst member device has a first power requirement that is less than apower requirement of the second member device.
 12. The method as inclaim 7, further comprising: storing a schedule corresponding tomultiple power states for the second member device, wherein the secondpower state is selected from the multiple power states based on theschedule.
 13. The method as in claim 12, wherein a power domaincorresponding to both the first member device and the second memberdevice is controlled based on the schedule.
 14. The method as in claim13, further comprising: receiving an input corresponding to power usageof the power domain, wherein power consumption of the second memberdevice in the second power state is based on the input.
 15. A computingdevice, comprising: a processor; and a memory configured to storeinstructions that when executed by the processor cause the computingdevice to perform steps that include: receiving an idle status signalfrom a first member device; automatically sending a sleep command to asecond member device, which shares a common power domain with the firstmember device and the computing device, in response to receiving theidle status signal, wherein the sleep command causes the second memberdevice to enter a first power state; receiving an active status signalfrom the first member device; and automatically sending a wake commandto the second member device in response to receiving the active statussignal, wherein the wake command causes the second member device totransition into a second power state.
 16. The computing device as inclaim 15, wherein the steps further include: storing an amount of timethe first member device is idle.
 17. The computing device as in claim15, wherein the steps further include: resetting an activity timer inresponse to receiving the active status signal from the first memberdevice.
 18. The computing device as in claim 15, wherein the first powerstate is a reduced power state relative to the second power state. 19.The computing device as in claim 15, wherein the first member device hasa first power requirement that is less than a power requirement of thesecond member device.
 20. The computing device as in claim 15, furthercomprising: a touch pad configured to receive a user input and controlthe second member device based on the user input.